package action.order;

import java.util.List;
import service.OrderService;
import util.ObjectFactory;
import action.BaseAction;
import entity.ReceiveAddress;

public class AddressAction extends BaseAction{
	//input
	private ReceiveAddress address;
	private int addrId;
	//output
	private List<ReceiveAddress> addrs;
	
	public String execute() throws Exception{
		OrderService service = ObjectFactory.getInstance(OrderService.class);
		addrs = service.getAddresses(session);
		address=service.getAddress(session, addrId);
		return "success";
	}
	
	public ReceiveAddress getAddress() {
		return address;
	}
	public void setAddress(ReceiveAddress address) {
		this.address = address;
	}
	public List<ReceiveAddress> getAddrs() {
		return addrs;
	}
	public void setAddrs(List<ReceiveAddress> addrs) {
		this.addrs = addrs;
	}
	public int getAddrId() {
		return addrId;
	}
	public void setAddrId(int addrId) {
		this.addrId = addrId;
	}
}
